package com.starsola.cloud.orderserver.web;

import com.starsola.cloud.orderserver.domain.Order;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("/api/v1/orders")
public class OrderController {

//    @Autowired
//    private IProductService productService;

    @RequestMapping("/list")
    public Object list() {
//        return productService.list();
        return null;
    }

    @RequestMapping("/save")
    public Object save(Long userId, Long productId) {

//        return productService.list();
        HashMap<String, Object> res = new HashMap<>();
        res.put("userId", userId);
        res.put("productId", productId);
        Order order = new Order();
        return res;
    }



}
